
var app = angular.module('webapp');

app.service('MortgateService', ['$http','$q',MortgateService]);

function MortgateService($http , $q){
	return {
		getLevel2Menu:function(data){
			return handleRequest('GET','/getLevel2Menu',data,$http,$q);
		},
		getPower:function(data){
			return handleRequest('GET','/getPower',data,$http,$q);
		},
		getMonrTgateAll : function(data){
			return handleRequest('GET','/getMonrTgateAll',data,$http,$q);
		},
		addMortgate:function(data){
			return handleRequest('POST','/addMortgate',data,$http,$q);
		},
		uploadMortgate:function(data){
			return handleRequest('POST','/uploadMortgate',data,$http,$q);
		},
		removeMortgate:function(data){
			return handleRequest('POST','/removeMortgate',data,$http,$q);
		}
	};
}